import instance from '@/util/http'
/**
 * 添加支付方式
 * @param data
 * @returns
 */
export const addPay = (data: any) => instance.post('/pay/pay/add', data)
/**
 * 更新支付方式
 * @param data
 * @returns
 */
export const updatePay = (data: any) => instance.put('/pay/pay/update', data)
/**
 * 支付page
 * @param data
 * @returns
 */
export const pagePay = (data: any) => instance.post('/pay/pay/page', data)
/**
 * 删除支付方式
 * @param id
 * @returns
 */
export const deletePay = (id: string) => instance.delete('/pay/pay/delete/' + id)
/**
 * 支付详情
 * @param id
 * @returns
 */
export const detailPay = (id: string) => instance.get('/pay/pay/detail/' + id)
/**
 * 添加支付配置
 * @param id
 * @param data
 * @returns
 */
export const addConfigs = (id: string, data: any) => instance.post('/pay/pay/config/add/' + id, data)
/**
 * 得到支付配置
 * @param id
 * @returns
 */
export const getConfigs = (id: string) => instance.get('/pay/pay/config/getDetail/' + id)
/**
 * 获取枚举list
 */
export const getEnumList = (name: string) => instance.get('/pay/enum/getList/' + name)
/**
 * 获取支付方式所有下拉框
 */
export const getPaySelect = () => instance.get('/pay/pay/getPaySelect')
